package pers.xuyong.code.lang.thread;

import java.util.concurrent.Callable;

/**
 * 线程池callable测试
 *
 * @author billymac
 * @version 1.0
 * @date 17/7/13  下午4:21
 * @since JDK1.8
 */
public class ExecuteCallable implements Callable<String> {
    private int id;

    public ExecuteCallable(int id) {
        this.id = id;
    }

    @Override
    public String call() throws Exception {
        System.out.println("线程被调用了 : " + Thread.currentThread().getName());
        return "线程id : " + id;
    }
}
